|
|
|
|
|
|
|
Figure 12.6
Resizing a world window may make
it extend off the edge of the picture. |
|
|
|
|
|
|
|
|
To implement a complete windowing system, you also need to allow the user to scroll or pan through a picture. Vertical and horizontal scrollbars provide an easy way to do this. Place a horizontal scrollbar at the bottom of your picture and a vertical scrollbar to the right. |
|
|
|
|
|
|
|
|
A scrollbar's Min and Max properties determine the values that the user can select. If you set Min = 1 and Max = 100, the user will be able to use the scrollbar to select values between 1 and 100. |
|
|
|
|
|
|
|
|
When you attach a scrollbar to a picture, keep in mind that the world window takes up space in world coordinates. If your picture occupies the range 1 <= y <= 100 in world coordinates, and your world window is 10 units tall, set the vertical scrollbar's properties to Min = 10 and Max = 100. You can use the value selected by the user to position |
|
|
|
|
|
|
|
|
Figure 12.7
Sometimes a viewport must contain empty space to show the whole picture. |
|
|
|
|
|